package com.mostsnails.common.base.constant;

/**
 * 请求状态返回 --自定义枚举
 *
 * @Author MostSnails
 * @Version 1.0
 */
public enum ResultCodeEnum {
    SUCCESS(200L, "操作成功"),
    FAILED(500L, "操作失败"),
    VALIDATE_FAILED(400L, "参数检验失败"),
    UNAUTHORIZED(401L, "暂未登录或token已经过期"),
    FORBIDDEN(403L, "没有相关权限");

    ResultCodeEnum(Long code, String name) {
        this.code = code;
        this.name = name;
    }

    private Long code;

    private String name;

    public Long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
